package com.google.zxing.client.result;

import com.google.zxing.BarcodeFormat;
import com.google.zxing.Result;
import java.util.HashMap;
import java.util.Map;

public final class ExpandedProductResultParser extends ResultParser
{
  private static String findAIvalue(int paramInt, String paramString)
  {
    if (paramString.charAt(paramInt) != '(')
      return null;
    String str = paramString.substring(paramInt + 1);
    StringBuilder localStringBuilder = new StringBuilder();
    for (int i = 0; ; i++)
    {
      if (i >= str.length())
        break label91;
      char c = str.charAt(i);
      if (c == ')')
        return localStringBuilder.toString();
      if ((c < '0') || (c > '9'))
        break;
      localStringBuilder.append(c);
    }
    label91: return localStringBuilder.toString();
  }

  private static String findValue(int paramInt, String paramString)
  {
    StringBuilder localStringBuilder = new StringBuilder();
    String str = paramString.substring(paramInt);
    int i = 0;
    if (i < str.length())
    {
      char c = str.charAt(i);
      if (c == '(')
      {
        if (findAIvalue(i, str) == null)
          localStringBuilder.append('(');
      }
      else
        while (true)
        {
          i++;
          break;
          localStringBuilder.append(c);
        }
    }
    return localStringBuilder.toString();
  }

  public ExpandedProductParsedResult parse(Result paramResult)
  {
    if (paramResult.getBarcodeFormat() != BarcodeFormat.RSS_EXPANDED)
      return null;
    String str1 = getMassagedText(paramResult);
    Object localObject1 = null;
    Object localObject2 = null;
    Object localObject3 = null;
    Object localObject4 = null;
    Object localObject5 = null;
    Object localObject6 = null;
    Object localObject7 = null;
    Object localObject8 = null;
    String str2 = null;
    String str3 = null;
    Object localObject9 = null;
    String str4 = null;
    String str5 = null;
    HashMap localHashMap = new HashMap();
    int i = 0;
    while (true)
    {
      label67: int j = str1.length();
      if (i >= j)
        break;
      String str6 = findAIvalue(i, str1);
      if (str6 == null)
        return null;
      int k = i + (2 + str6.length());
      String str7 = findValue(k, str1);
      i = k + str7.length();
      int m = -1;
      switch (str6.hashCode())
      {
      default:
      case 1536:
      case 1537:
      case 1567:
      case 1568:
      case 1570:
      case 1572:
      case 1574:
      case 1567966:
      case 1567967:
      case 1567968:
      case 1567969:
      case 1567970:
      case 1567971:
      case 1567972:
      case 1567973:
      case 1567974:
      case 1567975:
      case 1568927:
      case 1568928:
      case 1568929:
      case 1568930:
      case 1568931:
      case 1568932:
      case 1568933:
      case 1568934:
      case 1568935:
      case 1568936:
      case 1575716:
      case 1575717:
      case 1575718:
      case 1575719:
      case 1575747:
      case 1575748:
      case 1575749:
      case 1575750:
      }
      while (true)
        switch (m)
        {
        default:
          localHashMap.put(str6, str7);
          break label67;
          if (str6.equals("00"))
          {
            m = 0;
            continue;
            if (str6.equals("01"))
            {
              m = 1;
              continue;
              if (str6.equals("10"))
              {
                m = 2;
                continue;
                if (str6.equals("11"))
                {
                  m = 3;
                  continue;
                  if (str6.equals("13"))
                  {
                    m = 4;
                    continue;
                    if (str6.equals("15"))
                    {
                      m = 5;
                      continue;
                      if (str6.equals("17"))
                      {
                        m = 6;
                        continue;
                        if (str6.equals("3100"))
                        {
                          m = 7;
                          continue;
                          if (str6.equals("3101"))
                          {
                            m = 8;
                            continue;
                            if (str6.equals("3102"))
                            {
                              m = 9;
                              continue;
                              if (str6.equals("3103"))
                              {
                                m = 10;
                                continue;
                                if (str6.equals("3104"))
                                {
                                  m = 11;
                                  continue;
                                  if (str6.equals("3105"))
                                  {
                                    m = 12;
                                    continue;
                                    if (str6.equals("3106"))
                                    {
                                      m = 13;
                                      continue;
                                      if (str6.equals("3107"))
                                      {
                                        m = 14;
                                        continue;
                                        if (str6.equals("3108"))
                                        {
                                          m = 15;
                                          continue;
                                          if (str6.equals("3109"))
                                          {
                                            m = 16;
                                            continue;
                                            if (str6.equals("3200"))
                                            {
                                              m = 17;
                                              continue;
                                              if (str6.equals("3201"))
                                              {
                                                m = 18;
                                                continue;
                                                if (str6.equals("3202"))
                                                {
                                                  m = 19;
                                                  continue;
                                                  if (str6.equals("3203"))
                                                  {
                                                    m = 20;
                                                    continue;
                                                    if (str6.equals("3204"))
                                                    {
                                                      m = 21;
                                                      continue;
                                                      if (str6.equals("3205"))
                                                      {
                                                        m = 22;
                                                        continue;
                                                        if (str6.equals("3206"))
                                                        {
                                                          m = 23;
                                                          continue;
                                                          if (str6.equals("3207"))
                                                          {
                                                            m = 24;
                                                            continue;
                                                            if (str6.equals("3208"))
                                                            {
                                                              m = 25;
                                                              continue;
                                                              if (str6.equals("3209"))
                                                              {
                                                                m = 26;
                                                                continue;
                                                                if (str6.equals("3920"))
                                                                {
                                                                  m = 27;
                                                                  continue;
                                                                  if (str6.equals("3921"))
                                                                  {
                                                                    m = 28;
                                                                    continue;
                                                                    if (str6.equals("3922"))
                                                                    {
                                                                      m = 29;
                                                                      continue;
                                                                      if (str6.equals("3923"))
                                                                      {
                                                                        m = 30;
                                                                        continue;
                                                                        if (str6.equals("3930"))
                                                                        {
                                                                          m = 31;
                                                                          continue;
                                                                          if (str6.equals("3931"))
                                                                          {
                                                                            m = 32;
                                                                            continue;
                                                                            if (str6.equals("3932"))
                                                                            {
                                                                              m = 33;
                                                                              continue;
                                                                              if (str6.equals("3933"))
                                                                                m = 34;
                                                                            }
                                                                          }
                                                                        }
                                                                      }
                                                                    }
                                                                  }
                                                                }
                                                              }
                                                            }
                                                          }
                                                        }
                                                      }
                                                    }
                                                  }
                                                }
                                              }
                                            }
                                          }
                                        }
                                      }
                                    }
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
          break;
        case 0:
        case 1:
        case 2:
        case 3:
        case 4:
        case 5:
        case 6:
        case 7:
        case 8:
        case 9:
        case 10:
        case 11:
        case 12:
        case 13:
        case 14:
        case 15:
        case 16:
        case 17:
        case 18:
        case 19:
        case 20:
        case 21:
        case 22:
        case 23:
        case 24:
        case 25:
        case 26:
        case 27:
        case 28:
        case 29:
        case 30:
        case 31:
        case 32:
        case 33:
        case 34:
        }
      localObject2 = str7;
      continue;
      localObject1 = str7;
      continue;
      localObject3 = str7;
      continue;
      localObject4 = str7;
      continue;
      localObject5 = str7;
      continue;
      localObject6 = str7;
      continue;
      localObject7 = str7;
      continue;
      localObject8 = str7;
      str2 = "KG";
      str3 = str6.substring(3);
      continue;
      localObject8 = str7;
      str2 = "LB";
      str3 = str6.substring(3);
      continue;
      localObject9 = str7;
      str4 = str6.substring(3);
      continue;
      if (str7.length() < 4)
        return null;
      localObject9 = str7.substring(3);
      str5 = str7.substring(0, 3);
      str4 = str6.substring(3);
    }
    return new ExpandedProductParsedResult(str1, localObject1, localObject2, localObject3, localObject4, localObject5, localObject6, localObject7, localObject8, str2, str3, (String)localObject9, str4, str5, localHashMap);
  }
}

/* Location:           C:\Users\user\Desktop\dd28_pcdd720\classes_dex2jar.jar
 * Qualified Name:     com.google.zxing.client.result.ExpandedProductResultParser
 * JD-Core Version:    0.6.2
 */